<?php
/* @var $this IngatlanController */
/* @var $data KeresesForm */
?>

<div class="form">
    
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'kereses-form',
        'enableAjaxValidation' => false,
        'action' => yii::app()->createUrl('kereses/keres'),
        'method' => 'get',
            ));
    ?>

    <div class="row">
        <?php echo $form->labelEx($data, 'minAr'); ?>
        <?php echo $form->textField($data, 'minAr'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($data, 'maxAr'); ?>
        <?php echo $form->textField($data, 'maxAr'); ?>
    </div>


    <div class="row">
        <?php
        $ingatlan_tipus = IngatlanTipus::model()->findAll();
        //print_r($ingatlan_kategoriak);
        echo CHtml::dropDownList('ing_tip', 'ID', CHtml::listData($ingatlan_tipus, 'ID', 'tipus_nev'), array('empty' => '(Select a type)'));
        ?>
    </div>
    
    <div class = "row">
        <?php
        $varos = Varos::model()->findAll();
        //print_r($ingatlan_kategoriak);
        echo CHtml::dropDownList('varos', 'ID', CHtml::listData($varos, 'ID', 'varos_nev'), array('empty' => '(Select a type)'));
        ?>
    </div>
    
    <div class="row">
        <?php
        echo "<b>Ingatlan jellemzők</b></br>";
        ?>
        <?php
        echo CHtml::activeCheckboxList(
                IngatlanJellemzo::model(), 'ID', CHtml::listData(IngatlanJellemzo::model()->findAll(), 'ID', 'jellemzo'), array('template'=>'<tr><td >{label}</td><td>{input}</td></tr>')
        );
        ?>
    </div>
    
    
    <div class="row buttons">
        <?php echo CHtml::submitButton('Keres'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->


<?php
if( isset($dataProvider) )
$this->widget('zii.widgets.CListView', array(
    'dataProvider' => $dataProvider,
    'itemView' => '_view',
));
?>